Make @typescript-eslint/eslint-plugin a required dependency#86
Open
anthonyryan1 wants to merge 1 commit intomicrosoft:mainfrom
Open
Make @typescript-eslint/eslint-plugin a required dependency#86anthonyryan1 wants to merge 1 commit intomicrosoft:mainfrom
anthonyryan1 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
It seems during one of the recent releases, this stopped working in npm
projects that didn't include @typescript-eslint/eslint-plugin
Example stack from a JS (non TypeScript) eslint repo utilizing this plugin:
```
Oops! Something went wrong! :(
ESLint: 9.24.0
Error: Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- /home/ar/Projects/website/node_modules/@microsoft/eslint-plugin-sdl/config/typescript.js
- /home/ar/Projects/website/node_modules/@microsoft/eslint-plugin-sdl/lib/index.js
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1335:12)
at require (node:internal/modules/helpers:136:16)
at Object.<anonymous> (/home/ar/Projects/website/node_modules/@microsoft/eslint-plugin-sdl/config/typescript.js:6:26)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32)
```
The easiest fix is to define this as a dependency, rather than a devDependency so that npm ensures it's availabe.
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems during one of the recent releases, this stopped working in npm projects that didn't include @typescript-eslint/eslint-plugin
Example stack from a JS (non TypeScript) eslint repo utilizing this plugin:
The easiest fix is to define this as a dependency, rather than a devDependency so that npm ensures it's availabe.